<template>
  <div id="app">
    <img src="./assets/logo.png">
    <ul class="app_ul">
      <li v-for="(item, index) in links" :key="index" class="app_ul_li">
        <a @click="$goRoute(item.route)">{{item.text}}</a>
      </li>
    </ul>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'app',
  data () {
    return {
      links: [
        {
          text: '胡萝卜',
          route: '/home'
        },
        {
          text: '大白菜',
          route: '/page01'
        },
        {
          text: '水蜜桃',
          route: '/page02'
        },
        {
          text: 'vfor',
          route: '/vfor'
        },
        {
          text: 'calculate',
          route: '/calculate'
        },
        {
          text: 'vueWatch',
          route: '/vueWatch'
        },
        {
          text: 'styleBind',
          route: '/styleBind'
        },
        {
          text: 'eventsHandler',
          route: '/eventsHandler'
        },
        {
          text: 'form',
          route: '/form'
        },
        {
          text: 'myComponent',
          route: '/myComponent'
        },
        {
          text: 'customOrder',
          route: '/customOrder'
        },
        {
          text: '过渡和动画',
          route: '/transitionDemo'
        },
        {
          text: 'vue 混入',
          route: '/mixins'
        },
        {
          text: 'ajax request',
          route: '/ajax'
        },
        {
          text: 'reactiveInterface',
          route: '/reactiveInterface'
        },
        {
          text: 'navigationListDemo',
          route: '/navigationListDemo'
        },
        {
          text: 'editDemo',
          route: '/editDemo'
        },
        {
          text: 'salesMenuDemo',
          route: '/salesMenuDemo'
        },
        {
          text: 'searchPageDemo',
          route: '/searchPageDemo'
        },
        {
          text: 'changeDiffLayout',
          route: '/changeDiffLayout'
        }
      ]
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

.text-center{
  text-align: center;
}

.spacing{
  margin-top: 30px;
}

.red{
  color: darkred;
}

.app_ul .app_ul_li{
  display: inline-block;
  margin-right: 10px;
}

.app_ul .app_ul_li a{
  display: inherit;
  padding: 5px 10px;
  border: 1px solid #cccccc
}

.app_ul .app_ul_li a:hover{
  cursor: pointer;
  color: #ffffff;
  background-color:#138bec;
  border: 1px solid #138bec;
}

</style>
